function Copy(){
  if($("input[type='checkbox']:checked").length < 1) {
    alert("Please select the file/folder to copy!");
    return;
  }
  html = '<div id="dirtree" style="padding: 5px;">Please wait.. Retrieving folder information..</div>';
  $dialog = $('<div></div>')
  .html(html)
  .dialog({
    autoOpen: false,
    title: "Copy File(s)",
    buttons: {
      "Close": function() {
        $(this).dialog('close');
      },
    
      "Copy": function() {
        $.ajax({
          type: "get",
          url: "modules/copy/copy.php",
          data: "t=" + new Date() + getCheckedQstring("files[]").querystring + "&destdir=" + $("input[name = 'folder']:checked").val(),
          dataType: "text",
          success: function(data) {
            $($dialog).dialog('close');
            alert(data);
          }
        });
      }
    },
    resizable: false,
    closeOnEscape: false,
    modal: true,
    open: function() {
      getSubfolders("#dirtree");
    },
    close: function() {
      $(this).remove();
    }
  });
  $dialog.dialog('open');
}
